. set seed 20220612
{\smallskip}
. use https://sftt.oss-cn-hangzhou.aliyuncs.com/kp09.dta, clear
{\smallskip}
. sftt lwage iq educ educ2 exper exper2 tenure tenure2 age married south ///
>          urban black sibs brthord meduc feduc
{\smallskip}
initial:       log likelihood = -821.98656
rescale:       log likelihood = -821.98656
rescale eq:    log likelihood = -821.98656
Iteration 0:   log likelihood = -821.98656  (not concave)
Iteration 1:   log likelihood = -790.17251  (not concave)
Iteration 2:   log likelihood = -501.76491  (not concave)
Iteration 3:   log likelihood = -398.01182  (not concave)
Iteration 4:   log likelihood = -304.59026  (not concave)
Iteration 5:   log likelihood = -250.54916  (not concave)
Iteration 6:   log likelihood = -243.05924  (not concave)
Iteration 7:   log likelihood = -236.83674  (not concave)
Iteration 8:   log likelihood = -232.99693  
Iteration 9:   log likelihood = -229.49069  
Iteration 10:  log likelihood =  -226.3742  
Iteration 11:  log likelihood = -226.08691  
Iteration 12:  log likelihood = -226.06914  
Iteration 13:  log likelihood = -226.06913  
{\smallskip}
{\bftt{Two-tier stochastic frontier model with exponential specification}}
{\smallskip}
                                                        Number of obs =    663
                                                        Wald chi2(16) = 319.41
Log likelihood = -226.06913                             Prob > chi2   = 0.0000
{\smallskip}
\HLI{15}{\TOPT}\HLI{64}
         lwage {\VBAR} Coefficient  Std. err.      z    P>|z|     [95\% conf. interval]
\HLI{15}{\PLUS}\HLI{64}
frontier_lwage {\VBAR}
            iq {\VBAR}   .0043955   .0011061     3.97   0.000     .0022277    .0065634
          educ {\VBAR}   2.036803   1.128628     1.80   0.071    -.1752673    4.248874
         educ2 {\VBAR}  -.7563298     .55337    -1.37   0.172    -1.840915    .3282554
         exper {\VBAR}     .28234   .1561886     1.81   0.071    -.0237841     .588464
        exper2 {\VBAR}  -.1005302   .0921451    -1.09   0.275    -.2811314    .0800709
        tenure {\VBAR}   .1535867   .0635696     2.42   0.016     .0289925    .2781808
       tenure2 {\VBAR}  -.0568321   .0380829    -1.49   0.136    -.1314732     .017809
           age {\VBAR}   .4950143   .1867546     2.65   0.008     .1289819    .8610466
       married {\VBAR}   .2060007   .0443427     4.65   0.000     .1190905    .2929109
         south {\VBAR}  -.0348172   .0297127    -1.17   0.241     -.093053    .0234186
         urban {\VBAR}   .2208797   .0290555     7.60   0.000     .1639319    .2778275
         black {\VBAR}  -.1022164   .0526949    -1.94   0.052    -.2054966    .0010637
          sibs {\VBAR}   .0088167   .0072321     1.22   0.223    -.0053579    .0229912
       brthord {\VBAR}   -.015372   .0106093    -1.45   0.147    -.0361658    .0054218
         meduc {\VBAR}   .0081452   .0056126     1.45   0.147    -.0028553    .0191456
         feduc {\VBAR}   .0076534   .0050712     1.51   0.131    -.0022858    .0175927
         _cons {\VBAR}   3.858254   .6128945     6.30   0.000     2.657003    5.059505
\HLI{15}{\PLUS}\HLI{64}
ln_sig_v       {\VBAR}
         _cons {\VBAR}  -1.659803   .1570298   -10.57   0.000    -1.967576    -1.35203
\HLI{15}{\PLUS}\HLI{64}
ln_sig_u       {\VBAR}
         _cons {\VBAR}  -1.510707   .1146933   -13.17   0.000    -1.735502   -1.285913
\HLI{15}{\PLUS}\HLI{64}
ln_sig_w       {\VBAR}
         _cons {\VBAR}  -1.665971   .1230849   -13.54   0.000    -1.907213   -1.424729
\HLI{15}{\BOTT}\HLI{64}
{\smallskip}
. sftt sigs
{\smallskip}
               Variance Estimation          
\HLI{47}
sigma_v    :       0.1902
sigma_u    :       0.2208
sigma_w    :       0.1890
sigma_v_sq :       0.0362
sigma_u_sq :       0.0487
sigma_w_sq :       0.0357
\HLI{47}
               Variance Analysis          
\HLI{47}
Total sigma_sqs     :  0.1206
(sigu2+sigw2)/Total :  0.7002
sigu2/(sigu2+sigw2) :  0.5770
sigw2/(sigu2+sigw2) :  0.4230
sig_w - sig_u       : -0.0317
\HLI{47}
